package com.cssl.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class DtsCoupon implements Serializable {
    /**
     * 优惠券id(更改数据库优惠券Id)
     */
    String id;
    /**
     * 优惠券名称
     */
    String name;
    /**
     * 描述(通常为使用优惠券限制描述)
     */
    String desc;
    /**
     * 优惠券标签
     */
    String tag;
    /**
     * 优惠券数量
     * 0 :无限量
     */
    Integer total;
    /**
     * 优惠金额
     */
    Double disCount;
    /**
     * 最小消费才能使用
     */
    Double min;
    /**
     * 用户领券限制数量
     * 0 ,不限制
     * 1.限制一张
     */
    Integer limit;
    /**
     * 优惠券赠送类型
     * 0,通用券,用户领取
     * 1,注册赠券
     * 2,优惠券码兑换
     */
    Integer type;
    /**
     * 优惠券状态
     * 0:可用
     * 1:过期
     * 2:下架
     */
    Integer status;
    /**
     * 商品限制类型
     * 0:全商品
     * 1:类目限制
     * 2:商品限制
     */
    Integer goodsType;
    /**
     * 商品限制值
     * 0:空集合
     * 1:类名集合
     * 2:商品集合
     */
    String goodsValue;
    /**
     * 优惠券兑换码
     */
    String code;
    /**
     * 有效时间限制
     * 0,基于领取时间的有效天数
     * 1,startTime和endTime有效期
     */
    Integer timeType;
    /**
     * 基于领取时间的有效天数days。
     */
    Integer days;
    /**
     * 使用券开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date startTime;
    /**
     * 使用券截至时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date endTime;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date addTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date updateTime;
    /**
     * 逻辑删除
     */
    Integer deleted;


    @Override
    public String toString() {
        return "DtsCoupon{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                ", tag='" + tag + '\'' +
                ", total=" + total +
                ", disCount=" + disCount +
                ", min=" + min +
                ", limit=" + limit +
                ", type=" + type +
                ", status=" + status +
                ", goodsType=" + goodsType +
                ", goodsValue='" + goodsValue + '\'' +
                ", code='" + code + '\'' +
                ", timeType=" + timeType +
                ", days=" + days +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", addTime=" + addTime +
                ", updateTime=" + updateTime +
                ", deleted=" + deleted +
                '}';
    }

    public DtsCoupon() {
    }

    public DtsCoupon(String id, String name, String desc, String tag, Integer total, Double disCount, Double min, Integer limit, Integer type, Integer status, Integer goodsType, String goodsValue, String code, Integer timeType, Integer days, Date startTime, Date endTime, Date addTime, Date updateTime, Integer deleted) {
        this.id = id;
        this.name = name;
        this.desc = desc;
        this.tag = tag;
        this.total = total;
        this.disCount = disCount;
        this.min = min;
        this.limit = limit;
        this.type = type;
        this.status = status;
        this.goodsType = goodsType;
        this.goodsValue = goodsValue;
        this.code = code;
        this.timeType = timeType;
        this.days = days;
        this.startTime = startTime;
        this.endTime = endTime;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.deleted = deleted;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Double getDisCount() {
        return disCount;
    }

    public void setDisCount(Double disCount) {
        this.disCount = disCount;
    }

    public Double getMin() {
        return min;
    }

    public void setMin(Double min) {
        this.min = min;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(Integer goodsType) {
        this.goodsType = goodsType;
    }

    public String getGoodsValue() {
        return goodsValue;
    }

    public void setGoodsValue(String goodsValue) {
        this.goodsValue = goodsValue;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getTimeType() {
        return timeType;
    }

    public void setTimeType(Integer timeType) {
        this.timeType = timeType;
    }

    public Integer getDays() {
        return days;
    }

    public void setDays(Integer days) {
        this.days = days;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }
}
